/*
 * ENUM Discoverer. ENUM Demonstration software, demonstrating the potential of ENUM.
 * 
 * Copyright (C) 2009 SIDN and ISOC.nl
 * 
 * This file is part of ENUM Discoverer.
 *
 * ENUM Discoverer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ENUM Discoverer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with ENUM Discoverer.  If not, see <http://www.gnu.org/licenses/>.
 */

package nl.sidn.enumdiscoverer.contacts.adapters;

import nl.sidn.enumdiscoverer.EnumRecord;
import nl.sidn.enumdiscoverer.contacts.ContactProfileAggregator;

/**
 * Interface for adapters to store some data retrieved from ENUM in a standard
 * Android Contacts field.
 * @author	Grant Patterson (grant.patterson@catalyst.net.nz)
 */
public interface ContactAdapter {
	
	/**
	 * Update Contact details for a contact using enumRecord
	 * @param urlCapture The substring of the ENUM record URL that matched the
	 *            first capturing group present in the mapping ContactMappingRule
	 *            pattern. If no capturing group was present, this is the whole URL
	 * @param enumRecord A record retrieved from ENUM to update contact with
	 * @param profileAggregator Aggregates results from multiple adapters and
	 *            manages writing to Contacts
	 */
	void updateContact(String urlCapture, EnumRecord enumRecord,
			ContactProfileAggregator profileAggregator);
}
